void SPI_TransmitReceive_Blocking_8bit(spi_type* spi_x,uint8_t* TX_Buf,uint8_t* RX_Buf,uint16_t size)
{
	uint8_t * TX_Add = TX_Buf;
	uint8_t * RX_Add = RX_Buf;
	while(size--)
	{
		while(spi_i2s_flag_get(spi_x, SPI_I2S_TDBE_FLAG) == RESET);
		spi_i2s_flag_clear(spi_x, SPI_I2S_TDBE_FLAG);
		spi_i2s_data_transmit(spi_x, (uint8_t)*TX_Add);
		TX_Add++;
		while(spi_i2s_flag_get(spi_x, SPI_I2S_RDBF_FLAG) == RESET);
		spi_i2s_flag_clear(spi_x, SPI_I2S_RDBF_FLAG);
		*RX_Add = (uint8_t)spi_i2s_data_receive(spi_x);
		RX_Add++;
	}
}

void SPI_TransmitReceive_Blocking_16bit(spi_type* spi_x,uint16_t* TX_Buf,uint16_t* RX_Buf,uint16_t size)
{
	uint16_t * TX_Add = TX_Buf;
	uint16_t * RX_Add = RX_Buf;
	while(size--)
	{
		while(spi_i2s_flag_get(spi_x, SPI_I2S_TDBE_FLAG) == RESET);
		spi_i2s_flag_clear(spi_x, SPI_I2S_TDBE_FLAG);
		spi_i2s_data_transmit(spi_x, (uint16_t)*TX_Add);
		TX_Add++;
		while(spi_i2s_flag_get(spi_x, SPI_I2S_RDBF_FLAG) == RESET);
		spi_i2s_flag_clear(spi_x, SPI_I2S_RDBF_FLAG);
		*RX_Add = (uint16_t)spi_i2s_data_receive(spi_x);
		RX_Add++;
	}
}

